#FIX SRC
cd ncl_ncarg-6.3.0

sed -i '35c #elif (defined(ia64) || defined(x86_64) || defined(amd64) || defined(aarch64))' common/src/libncarg_c/yMakefile

sed -i '85c #if defined(IRIX64) || defined(x86_64) || defined(__LP64__) || defined(aarch64)' ni/src/lib/nio/yMakefile

sed -i '46c EXTRA_CCOPTIONS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fsigned-char' ni/src/ncl/yMakefile
sed -i '113c #if defined(IRIX64) || defined(x86_64) || defined(ia64) || defined(__LP64__) || defined(aarch64)' ni/src/ncl/yMakefile
sed -i '168c CC_LD           = clang\+\+'  ni/src/ncl/yMakefile
sed -i '170c CC_LD           = clang\+\+'  ni/src/ncl/yMakefile

sed -i '21c #define CCompiler   clang' config/LINUX
sed -i '22c #define FCompiler   flang' config/LINUX
sed -i '23c #define CtoFLibraries   -lflang -lm -lpgmath -lflangrti -ltirpc' config/LINUX
sed -i '24c #define CtoFLibrariesUser  -lflang -lm -lpgmath -lflangrti -ltirpc' config/LINUX
sed -i '25c #define CcOptions      -fno-asm -fPIC -fopenmp -Wno-error=int-conversion -Xlinker -zmuldefs' config/LINUX
sed -i '40a void _swapshort (register char *bp, register unsigned n);' ncarview/src/lib/libncarg_ras/misc.c

sed -i '41a void _swaplong (register char *bp, register unsigned n);' ncarview/src/lib/libncarg_ras/misc.c

#这是一个笔记，仅供参考，不可用作脚本使用